# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-helpers
pkgname=('python2-helpers' 'python-helpers')
_pkgname=helpers
pkgver=0.2.0
pkgrel=7
pkgdesc='Improved developer experience, accumulated.'
arch=('any')
url='https://pypi.org/project/helpers/#files'
license=('MIT')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('833ae0dd18d73b4bf4a214b797ce8287f0403b66e413ef0b524440779b4488d95bbc6e0cf070156da88a8f9d64aeb1b57db49a5ac88606a0aeea26b5d6202e6a')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

build() {
  cd "$_pkgname-$pkgver-2"

  python2 setup.py build

  cd "$srcdir/$_pkgname-$pkgver"

  python setup.py build
}

package_python2-helpers() {
  depends=('python2')

  cd "$_pkgname-$pkgver-2"

  python2 setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build
}

package_python-helpers() {
  depends=('python')

  cd "$_pkgname-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build
}

